package com.jielin.handling.entity.tsuspect;

import java.util.Date;
import java.util.List;


import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jielin.handling.bean.base.BaseSearch;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.CascadeType;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class TSuspec extends BaseSearch {
    private String id;
    private  Integer twoTrial;

    private int isNew;//是否是最新审讯
    private String handleUnitCode;

    private String suspectId;

    private String policeId;

    private String suspectState;

    private String caseCode;

    private String caseName;

    private String name;

    private String formerName;

    private String headPhoto;

    private String idValue;

    private String personnelType;

    private String personnelOther;

    private Integer sex;

    private Integer age;

    private String phone;

    private String nation;

    private String household;

    private String politicalFace;

    private String address;

    private String educate;

    private String virtualId;

    private String cause;

    private String bracelet;

    private String chaperoneName;

    private  String relation;

    private String chaperoneIdValue;

    private String filedPersonnel;

    private String filedName;

    private String filedIdType;

    private String filedIdValue;

    private String filedHousehold;

    private String filedPhone;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private  Date startDate;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private  Date endDate;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createDate;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date modifyDate;

    private Integer isDeputy;

    private  Integer isdeputy;

    private String gotoType;

    private String unitName;

    private  String policeName;

    private  String organizationName;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date acceptTime;
    private String caseType;
    private String susName;
    private String pocName;

    private String idType;

    private String caseDetails;//案由

    private String nameAndDate;//查询待上传文件列表别名字段

    private String materialId;//待上传返回材料



    private String suspectnameAndDate;//嫌疑人姓名/时间
    private String crimeTime;//案发时间
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date completeDate;//案件完结时间
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date auditPassDate;
    private String caseStaus;//案件状态(未完结，已完结)
    private String materialStatus;//审核材料状态
    private String virtualType;
    private String virtualValue;
    private String auditId;
    private Integer withdrawalsCount;//撤回次数
    private String percentage;
    //办案类型 0 智能办案  1常规办案
    private String type;

    private  String nameAndIdValue;

    private String unitCode;

    //private List<ListVirtual> listArray;
    @Override
    public void setQueryCondition(JSONObject queryCondition) {
        this.policeId=queryCondition.getString("policeId");
        this.name=queryCondition.getString("name");
        this.caseCode = queryCondition.getString("caseCode");
        this.caseName = queryCondition.getString("caseName");
        this.caseType=queryCondition.getString("caseType");
        this.startDate=queryCondition.getDate("startDate");
        this.endDate=queryCondition.getDate("endDate");
        this.handleUnitCode=queryCondition.getString("handleUnitCode");
    }

}